package generate

type DeploymentTemplate struct {
	Name      string                 `json:"name" yaml:"name"`
	NameSpace string                 `json:"ns" yaml:"ns"`
	Labels    map[string]string      `json:"label" yaml:"label"`
	Count     int32                  `json:"count" yaml:"count"`
	Ports     []Port                 `json:"ports" yaml:"ports"`
	OtherSpec map[string]interface{} `json:"otherPodSpec" yaml:"otherPodSpec"`
}

type Port struct {
	Name          string `json:"name" yaml:"name"`
	HostPort      int32  `json:"hostPort" yaml:"hostPort"`
	ContainerPort int32  `json:"containerPort" yaml:"containerPort"`
	Protocol      string `json:"protocol" yaml:"protocol"`
	HostIP        string `json:"hostIP" yaml:"hostIP"`
}

type ServiceTemplate struct {
	Name        string        `json:"name" yaml:"name"`
	NameSpace   string        `json:"ns" yaml:"ns"`
	ServiceType string        `json:"serviceType" yaml:"serviceType"`
	Ports       []ServicePort `json:"ports" yaml:"ports"`
}

type ServicePort struct {
	Name        string  `json:"name" yaml:"name"`
	Protocol    string  `json:"protocol" yaml:"protocol"`
	AppProtocol *string `json:"appProtocol" yaml:"appProtocol"`
	Port        int32   `json:"port" yaml:"port"`
	TargetPort  int32   `json:"targetPort" yaml:"targetPort"`
	NodePort    int32   `json:"nodePort" yaml:"nodePort"`
}

func getLabelValue(id string) string {
	return id
}
